package web

import (
	"embed"
	"io/fs"
	"net/http"
)

//go:embed www/*
var embeddedFiles embed.FS

func check(err error) {
	if err != nil {
		panic(err)
	}
}

func Root() http.FileSystem {
	root, err := fs.Sub(embeddedFiles, "www")
	check(err)
	return http.FS(root)
}
